<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:v="http://shale.apache.org/validator">

<f:view>
<f:loadBundle var="text" basename="#{userTest.bundleName}"/>
<head>
    <title>#{text['take.test.results.heading']}</title>
</head>

<h:form id="userTest">
<h:panelGrid rendered="#{userTest.displayResult}">

    <c:forEach var="result" items="#{userTest.displayTestResults}">
    	<t:htmlTag value="fieldset">
					<h:panelGrid columns="1" border="5">
						<h:column>
							<h:outputText style="font-size:large;font-weight:bold;text-decoration:none;font-color=red" value="#{result.testName}"/>
						</h:column>
						<h:column >
							<h:outputText style="font-size:medium;text-decoration:none;" value="#{result.scoreShortDescription}"/>
						</h:column>
						<h:column >
							<h:outputText style="font-size:medium;text-decoration:none;" value="#{result.scoreLongDescription}" escape="false"/>
						</h:column>
						<h:column>							
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showMaxScore}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Maximal possible score="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.maxScoreString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showRawScore}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="User score="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.rawScoreString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showPercentageScore}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Percentage score="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.percentageScoreString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showZetaScore}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="z-score is "/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.zetaScore}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showPercentileRank}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Percentile score="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.percentileRankString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showStenScore}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Sten score is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.stenScoreString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showThetaEAP}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Ability estimate using EAP is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.thetaEAPString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showThetaML}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Ability estimate using MLE is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.thetaMLString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showThetaMAP}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Ability estimate using MAP is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.thetaMAPString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showErrorEAP}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Error in EAP estimate is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.errorEAPString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showErrorML}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Error in MLE estimate is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.errorMLString}"/>
							</h:panelGrid>
							<h:panelGrid columns="2" cellspacing="0" rendered="#{result.testTemplate.reportTemplate.showErrorMAP}">
								<h:outputText style="font-size:medium;text-decoration:none;font-color=red" value="Error in MAP estimate is ="/>
								<h:outputText style="font-size:medium;font-weight:bold;text-decoration:none;font-color=red" value="#{result.errorMAPString}"/>
							</h:panelGrid>


						</h:column>
					</h:panelGrid>
				</t:htmlTag>
			</c:forEach>
		<h:commandButton value="Done" action="mainMenu.xhtml" styleClass="button_inline"/>
    	</h:panelGrid>

</h:form>

</f:view>
</html>
